from langchain_core.prompts import ChatPromptTemplate

from com.wp.langchain.exercise.LLMInit import LLMInit
if __name__ == '__main__':
    llm = LLMInit().get_llm()
    prompt = ChatPromptTemplate.from_template("你好，我是{name}，我来自{country}")
    chain = prompt | llm
    response = chain.invoke({"name": "张三", "country": "中国"})
    print(response)